package org.alwayssuper.protocol.gbt32960;

import org.alwayssuper.protostar.annotation.Field;
import org.alwayssuper.protostar.annotation.Message;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.alwayssuper.protocol.basics.GBTMessage;
import org.alwayssuper.protocol.commons.GBTRequestType;
import org.alwayssuper.protocol.commons.transform.RealTimeConverterV2016;
import org.alwayssuper.protocol.commons.transform.RealTimeConverterV2025;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * @author alwaysSuper
 */
@ToString
@Data
@Accessors(chain = true)
@Message(GBTRequestType.实时信息上报)
public class G02 extends GBTMessage {
    @Field(length = 6, desc = "数据采集时间(YYMMDDHHMMSS)")
    private LocalDateTime collectTime;
    @Field(converter = RealTimeConverterV2016.class, desc = "实时信息上报2016版", version = 0)
    @Field(converter = RealTimeConverterV2025.class, desc = "实时信息上报2025版", version = 1)
    private Map<Integer, Object> realTimeData;
    
    /*
     * 注意：签名数据字段已迁移到SignatureData类中 (0xFF类型)
     * 在2025版本中，签名数据作为realTimeData的一部分，通过RealTimeConverterV2025处理
     * 包含以下字段：
     * - signatureType: 签名类型 (SM2/RSA/ECC)
     * - rValue: 签名R值 
     * - sValue: 签名S值
     */
}
